<?php
## include required files
/*******************************/ 
require_once '../../includefiles.php';
include_once("../../model/country.php");
/*******************************/
## Create Objects
/*******************************/
$countryObj = new Model_Country();

if ($_GET['countryname']){
	$countryname = $_GET['countryname']; 
}

if ($_GET['id']){
	$id = $_GET['id'];
}

if($countryname){
// this function check country exist or not
	 $result = $countryObj->checkCountryName(strtoupper(trim($countryname)), $id); 
	if(count($result) > 0){	
		if(strtoupper(trim($result['name_caps'])) == strtoupper($countryname)){  
			echo 'false';
		}
	}
	else{
		echo "true";	
	}
}
unset($countryObj);
?>


